package net.neocat.tcx.speed;

/**
 * Created with IntelliJ IDEA.
 * User: jschek
 * Date: 5/2/13
 * Time: 10:53 PM
 * To change this template use File | Settings | File Templates.
 */
abstract class AbstractSpeedCalculator implements SpeedCalculator {

    @Override
    public double calculateMilesPerHour(double powerWatts, int cadenceRpms, double grade, double altitudeMeters) {
        return 2.23694 * calculateMetersPerSecond(powerWatts, cadenceRpms, grade, altitudeMeters);
    }

    @Override
    public abstract double calculateMetersPerSecond(double powerWatts, int cadence, double grade, double altitudeMeters);
}
